package lc.com.lcpicturebackend.service;

import com.baomidou.mybatisplus.extension.service.IService;
import lc.com.lcpicturebackend.model.dto.carousel.CarouselConfigRequest;
import lc.com.lcpicturebackend.model.dto.carousel.CarouselImageUploadRequest;
import lc.com.lcpicturebackend.model.entity.CarouselItem;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 轮播图服务接口
 */
public interface CarouselService extends IService<CarouselItem> {

    /**
     * 获取轮播图配置
     */
    CarouselConfigRequest getCarouselConfig(String scene);

    /**
     * 保存轮播图配置
     */
    boolean saveCarouselConfig(CarouselConfigRequest carouselConfigRequest, String scene);

    /**
     * 获取轮播图项列表
     */
    List<CarouselItem> listCarouselItems(String scene);

    /**
     * 添加轮播图项
     */
    CarouselItem addCarouselItem(CarouselItem carouselItem);

    /**
     * 更新轮播图项
     */
    boolean updateCarouselItem(CarouselItem carouselItem);

    /**
     * 删除轮播图项
     */
    boolean deleteCarouselItem(Long id);

    /**
     * 更新轮播图项排序
     */
    boolean updateCarouselItemSort(List<CarouselItem> items);

    /**
     * 上传轮播图图片
     */
    CarouselImageUploadRequest uploadCarouselImage(MultipartFile file);
}